home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
serial
/
zyxel-1.5-s
/
zyxel-1
/
rsynth-2.0-diffs
< prev
next >
Wrap
Text File
|
1994-11-21
|
9KB
|
316 lines
diff -ur rsynth-2.0-orig/holmes.c rsynth-2.0/holmes.c
--- rsynth-2.0-orig/holmes.c Tue Nov 8 14:31:01 1994
+++ rsynth-2.0/holmes.c Sat Nov 12 22:22:38 1994
@@ -47,11 +47,11 @@
}
filter_t, *filter_ptr;
-static float filter PROTO((filter_ptr p, Float v));
+static inline float filter PROTO((filter_ptr p, Float v));
static void jsru_save PROTO((double f0, float *tp));
-static float
+static inline float
filter(p, v)
filter_ptr p;
Float v;
@@ -65,9 +65,9 @@
*/
-static void set_trans PROTO((slope_t * t, Elm_ptr a, Elm_ptr b, int ext, int e));
+static inline void set_trans PROTO((slope_t * t, Elm_ptr a, Elm_ptr b, int ext, int e));
-static void
+static inline void
set_trans(t, a, b, ext, e)
slope_t *t;
Elm_ptr a;
@@ -86,7 +86,7 @@
}
}
-static float linear PROTO((Float a, Float b, int t, int d));
+static inline float linear PROTO((Float a, Float b, int t, int d));
/*
______________ b
@@ -98,7 +98,7 @@
---------------t---------------
*/
-static float
+static inline float
linear(a, b, t, d)
Float a;
Float b;
@@ -116,9 +116,9 @@
}
}
-static float interpolate PROTO((char *w, char *p, slope_t * s, slope_t * e, Float mid, int t, int d));
+static inline float interpolate PROTO((char *w, char *p, slope_t * s, slope_t * e, Float mid, int t, int d));
-static float
+static inline float
interpolate(w, p, s, e, mid, t, d)
char *w;
char *p;
@@ -409,8 +409,8 @@
fclose(jsru_file);
}
-static int jsru_freq PROTO((Float f, Float base, Float inc));
-static int
+static inline int jsru_freq PROTO((Float f, Float base, Float inc));
+static inline int
jsru_freq(f, base, inc)
Float f;
Float base;
@@ -424,8 +424,8 @@
return i;
}
-static int jsru_amp PROTO((Float a));
-static int
+static inline int jsru_amp PROTO((Float a));
+static inline int
jsru_amp(a)
Float a;
{
diff -ur rsynth-2.0-orig/nsynth.c rsynth-2.0/nsynth.c
--- rsynth-2.0-orig/nsynth.c Tue Nov 8 14:31:05 1994
+++ rsynth-2.0/nsynth.c Sat Nov 12 22:22:39 1994
@@ -275,18 +275,18 @@
"Gain0"
};
-static void flutter PROTO((klatt_global_ptr globals, klatt_frame_ptr pars));
-static float resonator PROTO((resonator_ptr r, Float input));
-static float antiresonator PROTO((resonator_ptr r, Float input));
-static float impulsive_source PROTO((long nper));
-static float natural_source PROTO((long nper));
-static void setabc PROTO((long int f, long int bw, resonator_ptr rp));
-static void setabcg PROTO((long int f, long int bw, resonator_ptr rp, Float gain));
-static void setzeroabc PROTO((long int f, long int bw, resonator_ptr rp));
-static float DBtoLIN PROTO((klatt_global_ptr globals, long int dB));
-static float dBconvert PROTO((long int arg));
-static void overload_warning PROTO((klatt_global_ptr globals, long int arg));
-static short clip PROTO((klatt_global_ptr globals, Float input));
+static inline void flutter PROTO((klatt_global_ptr globals, klatt_frame_ptr pars));
+static inline float resonator PROTO((resonator_ptr r, Float input));
+static inline float antiresonator PROTO((resonator_ptr r, Float input));
+static inline float impulsive_source PROTO((long nper));
+static inline float natural_source PROTO((long nper));
+static inline void setabc PROTO((long int f, long int bw, resonator_ptr rp));
+static inline void setabcg PROTO((long int f, long int bw, resonator_ptr rp, Float gain));
+static inline void setzeroabc PROTO((long int f, long int bw, resonator_ptr rp));
+static inline float DBtoLIN PROTO((klatt_global_ptr globals, long int dB));
+static inline float dBconvert PROTO((long int arg));
+static inline void overload_warning PROTO((klatt_global_ptr globals, long int arg));
+static inline short clip PROTO((klatt_global_ptr globals, Float input));
static void pitch_synch_par_reset PROTO((klatt_global_ptr globals,
klatt_frame_ptr frame, long ns));
static void frame_init PROTO((klatt_global_ptr globals, klatt_frame_ptr frame));
@@ -323,7 +323,7 @@
Flutter is added by applying a quasi-random element constructed from three
slowly varying sine waves.
*/
-static void
+static inline void
flutter(globals, pars)
klatt_global_ptr globals;
klatt_frame_ptr pars;
@@ -338,7 +338,7 @@
F0hz10 += (long) delta_f0;
}
-static float
+static inline float
impulsive_source(nper)
long nper;
{
@@ -362,7 +362,7 @@
spectral zero around 800 Hz, magic constants a,b reset pitch-synch
*/
-static float
+static inline float
natural_source(nper)
long nper;
{
@@ -387,7 +387,7 @@
/* Convert formant freqencies and bandwidth into
resonator difference equation coefficents
*/
-static void
+static inline void
setabc(f, bw, rp)
long int f; /* Frequency of resonator in Hz */
long int bw; /* Bandwidth of resonator in Hz */
@@ -402,7 +402,7 @@
}
/* Convienience function for setting parallel resonators with gain */
-static void
+static inline void
setabcg(f, bw, rp, gain)
long int f; /* Frequency of resonator in Hz */
long int bw; /* Bandwidth of resonator in Hz */
@@ -416,7 +416,7 @@
/* Convert formant freqencies and bandwidth into
* anti-resonator difference equation constants
*/
-static void
+static inline void
setzeroabc(f, bw, rp)
long int f; /* Frequency of resonator in Hz */
long int bw; /* Bandwidth of resonator in Hz */
@@ -433,7 +433,7 @@
/* Convert from decibels to a linear scale factor */
-static float
+static inline float
DBtoLIN(globals, dB)
klatt_global_ptr globals;
long int dB;
@@ -454,7 +454,7 @@
#define ACOEF 0.005
#define BCOEF (1.0 - ACOEF) /* Slight decay to remove dc */
-static float
+static inline float
dBconvert(arg)
long int arg;
{
@@ -461,7 +461,7 @@
return 20.0 * log10((double) arg / 32767.0);
}
-static void
+static inline void
overload_warning(globals, arg)
klatt_global_ptr globals;
long int arg;
@@ -712,7 +712,7 @@
setabcg(0L, (long) globals->samrate, &rout, DBtoLIN(globals, Gain0));
}
-static short
+static inline short
clip(globals, input)
klatt_global_ptr globals;
Float input;
@@ -733,7 +733,7 @@
}
/* Generic resonator function */
-static float
+static inline float
resonator(r, input)
resonator_ptr r;
Float input;
@@ -751,7 +751,7 @@
*/
/* Output = (rnz.a * input) + (rnz.b * oldin1) + (rnz.c * oldin2) */
-static float
+static inline float
antiresonator(r, input)
resonator_ptr r;
Float input;
diff -ur rsynth-2.0-orig/phtoelm.c rsynth-2.0/phtoelm.c
--- rsynth-2.0-orig/phtoelm.c Tue Nov 8 14:31:08 1994
+++ rsynth-2.0/phtoelm.c Sat Nov 12 22:22:39 1994
@@ -25,9 +25,9 @@
trie_ptr phtoelm = NULL;
-static Elm_ptr find_elm PROTO((char *s));
+static inline Elm_ptr find_elm PROTO((char *s));
-static Elm_ptr
+static inline Elm_ptr
find_elm(s)
char *s;
{
diff -ur rsynth-2.0-orig/say.c rsynth-2.0/say.c
--- rsynth-2.0-orig/say.c Tue Nov 8 14:31:15 1994
+++ rsynth-2.0/say.c Sat Nov 12 22:22:39 1994
@@ -61,6 +61,7 @@
char *program = "say";
static int verbose = 0;
+static int realtime = 0;
unsigned
spell_out(word, n, phone)
@@ -69,6 +70,7 @@
darray_ptr phone;
{
unsigned nph = 0;
+ if (verbose)
fprintf(stderr, "Spelling '%.*s'\n", n, word);
while (n-- > 0)
{
@@ -237,9 +239,10 @@
long value = 0;
if (sign < 0)
ch = *++s;
- while (isdigit(ch = *s))
+ while (isdigit(ch = *s) || ch == ',')
{
- value = value * 10 + ch - '0';
+ if (ch != ',')
+ value = value * 10 + ch - '0';
s++;
}
if (ch == '.' && isdigit(s[1]))
@@ -316,6 +319,11 @@
}
while (isspace(ch = *s))
s++;
+ if (realtime && phone->items)
+ {
+ say_phones((char *) darray_find(phone, 0), phone->items, verbose);
+ phone->items = 0;
+ }
}
return nph;
}
@@ -413,7 +422,10 @@
argc = init_holmes(argc, argv);
argc = dict_init(argc, argv);
argc = file_init(argc, argv);
- argc = getargs("Misc",argc, argv, "v", NULL, &verbose, "Verbose, show phonetic form",NULL);
+ argc = getargs("Misc",argc, argv,
+ "v", NULL, &verbose, "Verbose, show phonetic form",
+ "R", NULL, &realtime, "Realtime, speak while analyzing",
+ NULL);
if (help_only)
{
fprintf(stderr,"Usage: %s [options as above] words to say\n",program);
diff -ur rsynth-2.0-orig/text.c rsynth-2.0/text.c
--- rsynth-2.0-orig/text.c Tue Nov 8 14:31:17 1994
+++ rsynth-2.0/text.c Sat Nov 12 22:22:39 1994
@@ -51,7 +51,7 @@
typedef char *Rule[4]; /* A rule is four character pointers */
extern Rule *Rules[]; /* An array of pointers to rules */
-int
+inline int
isvowel(chr)
int chr;
{
@@ -59,7 +59,7 @@
chr == 'O' || chr == 'U');
}
-int
+inline int
isconsonant(chr)
int chr;
{